package com.eamois.action.sys;

import java.util.Collection;

import com.eamois.action.BaseAction;
import com.eamois.domain.graph.GraphPolygon;
import com.eamois.domain.sys.DifferentialMeaTemplate;
import com.eamois.domain.sys.MeaPolygon;
import com.eamois.service.sys.MeaPolygonService;
import com.eamois.util.ServiceFactory;

public class MeaPolygonAction extends BaseAction {
	private MeaPolygonService graphPolygonService;

	public MeaPolygonService getGraphPolygonService() {
		return graphPolygonService;
	}

	public void setGraphPolygonService(MeaPolygonService graphPolygonService) {
		this.graphPolygonService = graphPolygonService;
	}

	public MeaPolygonAction() {
		setGraphPolygonService((MeaPolygonService) ServiceFactory.getInstance()
				.getBean("meaPolygonService"));
	}
	
	public Collection<MeaPolygon> findGraphPolygonByTemplate(DifferentialMeaTemplate graphTemplate) {
		return this.getGraphPolygonService().findGraphPolygonByTemplate(graphTemplate);
	}

	public void saveGraphPolygon(MeaPolygon graphPolygon) {
		getGraphPolygonService().save(graphPolygon);
	}

	public void removeGraphLine(MeaPolygon graphPolygon) {
		getGraphPolygonService().remove(graphPolygon);
	}


}
